#include<iostream>
#include<vector>

void printVector2(std::vector<int>& v) {
	for (std::vector<int>::iterator it = v.begin(); it != v.end(); it++) {

		std::cout << *it << " ";

	}
	std::cout << std::endl;

}

void test21() {
	std::vector<int> v1;
	for (int i = 0; i < 10; i++) {
		v1.push_back(i);
	}
	printVector2(v1);
	
	std::vector<int>v2;
	v2 = v1;
	printVector2(v2);
	std::vector<int> v3;
	v3.assign(v1.begin(), v1.end());
	printVector2(v3);
	std::vector<int> v4;
	v4.assign(10, 100);
	printVector2(v4);


}
int main2() {
	test21();
	system("pause");
	return 0;
}